// $codepro.audit.disable numericLiterals
/**
 * package for all the model classes to fit the mvc format
 */
package javamonsters.model;

import java.math.BigDecimal;


/**
 * Represents a good that can be bought and sold in the game
 * 
 * @author Evan
 */
public enum TradeGood {
	
	WATER(SolarSystem.TechLevels.PRE_AGRICULTURE, 
		  SolarSystem.TechLevels.PRE_AGRICULTURE,
		  SolarSystem.TechLevels.MEDIEVAL, 
		  new BigDecimal(30.0), new BigDecimal(3.0), new BigDecimal(4.0), 
		  SolarSystem.Attributes.LOTS_OF_WATER, 
		  SolarSystem.Attributes.DESERT),
	FURS(SolarSystem.TechLevels.PRE_AGRICULTURE, 
		 SolarSystem.TechLevels.PRE_AGRICULTURE, 
		 SolarSystem.TechLevels.PRE_AGRICULTURE,
		 new BigDecimal(250.0), new BigDecimal(10.0), new BigDecimal(10.0),
		 SolarSystem.Attributes.RICH_FAUNA, 
		 SolarSystem.Attributes.LIFELESS),
	FOOD(SolarSystem.TechLevels.AGRICULTURE,
		 SolarSystem.TechLevels.PRE_AGRICULTURE, 
		 SolarSystem.TechLevels.AGRICULTURE,
		 new BigDecimal(100.0), new BigDecimal(5.0), new BigDecimal(5.0),
		 SolarSystem.Attributes.RICH_SOIL, 
		 SolarSystem.Attributes.POOR_SOIL),
	ORE(SolarSystem.TechLevels.MEDIEVAL, 
		SolarSystem.TechLevels.MEDIEVAL, 
		SolarSystem.TechLevels.RENAISSANCE,
		new BigDecimal(350.0), new BigDecimal(20.0), new BigDecimal(10.0),
		SolarSystem.Attributes.MINERAL_RICH, 
		SolarSystem.Attributes.MINERAL_POOR), 
	GAMES(SolarSystem.TechLevels.RENAISSANCE,
		  SolarSystem.TechLevels.AGRICULTURE, 
		  SolarSystem.TechLevels.POST_INDUSTRIAL,
		  new BigDecimal(250.0), new BigDecimal(8.0), new BigDecimal(5.0),
		  SolarSystem.Attributes.ARTISTIC, SolarSystem.Attributes.NOTHING),
	FIREARMS(SolarSystem.TechLevels.RENAISSANCE,
			SolarSystem.TechLevels.AGRICULTURE,
			SolarSystem.TechLevels.INDUSTRIAL,
			new BigDecimal(1250.0), new BigDecimal(15.0), new BigDecimal(90.0),
			SolarSystem.Attributes.WARLIKE,
			SolarSystem.Attributes.NOTHING),
	MEDICINE(SolarSystem.TechLevels.EARLY_INDUSTRIAL,
			SolarSystem.TechLevels.AGRICULTURE,
			SolarSystem.TechLevels.POST_INDUSTRIAL,
			new BigDecimal(650.0), new BigDecimal(10.0), new BigDecimal(10.0),
			SolarSystem.Attributes.LOTS_OF_HERBS,
			SolarSystem.Attributes.NOTHING),
	MACHINES(SolarSystem.TechLevels.EARLY_INDUSTRIAL,
			SolarSystem.TechLevels.RENAISSANCE,
			SolarSystem.TechLevels.INDUSTRIAL,
			new BigDecimal(900.0), new BigDecimal(20.0), new BigDecimal(5.0),
			SolarSystem.Attributes.NOTHING,
			SolarSystem.Attributes.NOTHING), 
	NARCOTICS(SolarSystem.TechLevels.INDUSTRIAL, 
			SolarSystem.TechLevels.PRE_AGRICULTURE,
			SolarSystem.TechLevels.INDUSTRIAL,
			new BigDecimal(3500.0), new BigDecimal(35.0), new BigDecimal(75.0),
			SolarSystem.Attributes.WEIRD_MUSHROOMS,
			SolarSystem.Attributes.NOTHING),
	ROBOTS(SolarSystem.TechLevels.POST_INDUSTRIAL,
			SolarSystem.TechLevels.EARLY_INDUSTRIAL,
			SolarSystem.TechLevels.HI_TECH,
			new BigDecimal(5000.0), new BigDecimal(50.0), new BigDecimal(75.0),
			SolarSystem.Attributes.NOTHING, 
			SolarSystem.Attributes.NOTHING);

	/**
	 * minimum tech level required to produce the trade good, minimum tech level
	 * required to use the trade good, and the tech level that produced the most of the 
	 * trade good
	 */
	private final SolarSystem.TechLevels minProdTechLvl, minUseTechLvl, topProdTechLvl;
	
	/**
	 * the base price of the trade good, the increase in price per tech level of the trade
	 * good, and the variance of the price of the trade good
	 */
	private final BigDecimal basePrice, incPerLvl, variance;
	
	/**
	 * the condition that makes the trade good unusually cheap, and the condition
	 * that makes the trade good unusually expensive
	 */
	private final SolarSystem.Attributes cheapCond, xpnsvCond;
	
	/**
	 * Constructor for Trade Good
	 * 
	 * @param minProdTechLvl minimum tech level required to produce the trade good
	 * @param minUseTechLvl minimum tech level required to use the trade good
	 * @param topProdTechLvl the tech level that produced the most of the trade good
	 * @param basePrice the base price of the trade good
	 * @param incPerLvl the increase in price per tech level of the trade good
	 * @param variance the variance of the price of the trade good
	 * @param cheapCond the condition that makes the trade good unusually cheap
	 * @param xpnsvCond the condition that makes the trade good unusually expensive
	 */
	private TradeGood(SolarSystem.TechLevels minProdTechLvl, SolarSystem.TechLevels // $codepro.audit.disable largeNumberOfParameters
			          minUseTechLvl, SolarSystem.TechLevels topProdTechLvl,
			          BigDecimal basePrice, BigDecimal incPerLvl, BigDecimal
			          variance, SolarSystem.Attributes 
			          cheapCond, SolarSystem.Attributes xpnsvCond) {
		
		this.minProdTechLvl = minProdTechLvl;
		this.minUseTechLvl = minUseTechLvl;
		this.topProdTechLvl = topProdTechLvl;
		this.basePrice = basePrice;
		this.incPerLvl = incPerLvl;
		this.variance = variance;
		this.cheapCond = cheapCond;
		this.xpnsvCond = xpnsvCond;
		
	}
	
	/**
	 * Retrieve the minimum TechLevel to produce this TradeGood
	 * @return the minimum TechLevel to produce this TradeGood
	 */
	public SolarSystem.TechLevels getMinProdTechLvl() {
		return minProdTechLvl;
	}
	
	/**
	 * Retrieve the minimum TechLevel to use this TradeGood
	 * @return the minimum TechLevel to use this TradeGood
	 */
	public SolarSystem.TechLevels getMinUseTechLvl() {
		return minUseTechLvl;
	}
	
	/**
	 * Retrieve the TechLevel which produces most of this TradeGood
	 * @return the TechLevel which produces most of this TradeGood
	 */
	public SolarSystem.TechLevels getTopProdTechLvl() {
		return topProdTechLvl;
	}
	
	/**
	 * Retrieve the base price for this TradeGood
	 * @return the base price for this TradeGood
	 */
	public BigDecimal getBasePrice() {
		return basePrice;
	}
	
	/**
	 * Retrieve the increase per tech level for this TradeGood
	 * @return the increase per tech level for this TradeGood
	 */
	public BigDecimal getIncPerLvl() {
		return incPerLvl;
	}
	
	/**
	 * Retrieves the variance for this TradeGood
	 * @return the variance for this TradeGood
	 */
	public BigDecimal getVariance() {
		return variance;
	}
	
	/**
	 * Retrieves the condition that makes this TradeGood cheap
	 * @return the cheap condition for this TradeGood
	 */
	public SolarSystem.Attributes getCheapCond() {
		return cheapCond;
	}
	
	/**
	 * Retrieves the condition that makes this TradeGood expensive
	 * @return the expensive condition for this TradeGood
	 */
	public SolarSystem.Attributes getXpnsvCond() {
		return xpnsvCond;
	}
	
	
}
